package BookManagement.service;

import BookManagement.domain.Borrow;
import org.apache.ibatis.annotations.Select;

import java.util.HashMap;
import java.util.List;

public interface BorrowService {

    //查询某人是否借某书
    public Borrow searchBorrowingBook(HashMap<String,Object> map);

    //借书
    public int borrowBook(Borrow borrow);

    //还书
    public int backBook(HashMap<String,Object> map);

    //续借
    public int renewBook(HashMap<String,Object> map);

    //查询某人的借书情况
    public List<Borrow> searchAllBorrowingBookWithUsername(HashMap<String,Object> map);

    //查询某书的借阅情况
    public List<Borrow> searchAllBorrowingBookWithBookISBN(HashMap<String,Object> map);

    //查询所有借阅情况
    public List<Borrow> searchAllBorrowingBook(HashMap<String,Object> map);

    //查询借出数量
    public int getTotalBorrowing();

    public int findBorrowCountByUser(String username);

    public int findBorrowCountByBook(String bookISBN);

}
